package com.hl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.hl.mapper.MemberPointsHistoryMapper;
import com.hl.domain.MemberPointsHistory;
import com.hl.service.IMemberPointsHistoryService;

/**
 * 会员积分历史Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-05
 */
@Service
@Primary
public class MemberPointsHistoryServiceImpl implements IMemberPointsHistoryService 
{
    @Autowired
    private MemberPointsHistoryMapper memberPointsHistoryMapper;

    /**
     * 查询会员积分历史
     * 
     * @param id 会员积分历史主键
     * @return 会员积分历史
     */
    @Override
    public MemberPointsHistory selectMemberPointsHistoryById(Integer id)
    {
        return memberPointsHistoryMapper.selectMemberPointsHistoryById(id);
    }

    /**
     * 查询会员积分历史列表
     * 
     * @param memberPointsHistory 会员积分历史
     * @return 会员积分历史
     */
    @Override
    public List<MemberPointsHistory> selectMemberPointsHistoryList(MemberPointsHistory memberPointsHistory)
    {
        return memberPointsHistoryMapper.selectMemberPointsHistoryList(memberPointsHistory);
    }

    /**
     * 新增会员积分历史
     * 
     * @param memberPointsHistory 会员积分历史
     * @return 结果
     */
    @Override
    public int insertMemberPointsHistory(MemberPointsHistory memberPointsHistory)
    {
        return memberPointsHistoryMapper.insertMemberPointsHistory(memberPointsHistory);
    }

    /**
     * 修改会员积分历史
     * 
     * @param memberPointsHistory 会员积分历史
     * @return 结果
     */
    @Override
    public int updateMemberPointsHistory(MemberPointsHistory memberPointsHistory)
    {
        return memberPointsHistoryMapper.updateMemberPointsHistory(memberPointsHistory);
    }

    /**
     * 批量删除会员积分历史
     * 
     * @param ids 需要删除的会员积分历史主键
     * @return 结果
     */
    @Override
    public int deleteMemberPointsHistoryByIds(Integer[] ids)
    {
        return memberPointsHistoryMapper.deleteMemberPointsHistoryByIds(ids);
    }

    /**
     * 删除会员积分历史信息
     * 
     * @param id 会员积分历史主键
     * @return 结果
     */
    @Override
    public int deleteMemberPointsHistoryById(Integer id)
    {
        return memberPointsHistoryMapper.deleteMemberPointsHistoryById(id);
    }
}
